
clear all

use "data.dta"

* Direct, indirect, and net (total) effects

quietly: sem ///
(Conform -> conf1 conf2 conf3 conf4) ///
(p_easte <- agreem Conform) ///
(agreem <- Conform), ///
group(contnt)
estat teffects, standardized

* Absolute difference - direct effect

disp (.3821954-.3142171)
disp (.7334229-.5501877)/sqrt(.1378958^2+.1531129^2)
disp (2*(1-normal(.88925228)))

* Absolute difference - indirect effect

disp (.0530455+.069401)
disp (.101793+.1215197)/sqrt(.0487395^2+.0482283^2)
disp (2*(1-normal(3.2568281)))

* Absolute difference - net (total) effect

disp (.435241-.2448161)
disp (.8352159-.4286679)/sqrt(.1310667^2+.1458281^2)
disp (2*(1-normal(2.0734605)))
